<template>
    <div>
        <div class="sort">
            <h1>行业分类</h1>
            <ul>
                <li v-for="item in busdata" :key="item.id" @click="selpurbyid(item.id)"><a href="#">{{ item.businessName }}</a></li>
            </ul>
        </div>
        <div class="tgfw">
            <h1>采购信息</h1>
            <el-row>
                <el-col :lg="24" :sm="24" :xs="24" v-for="item in siddata" :key="item.orderid">
                    <div>
                        <img :src="item.img1">
                        <div class="box-font">
                            <h3>{{item.goodsname}}</h3>
                            <p>{{item.orderNameen}}</p>
                            <router-link :to="`/pdetails?id=${item.orderid}`">
                                <el-button type="danger" round>采购订单</el-button>
                            </router-link>
                        </div>
                    </div>
                </el-col>
            </el-row>
        </div>
    </div>
</template>
<script>
import { toRefs, reactive } from 'vue'

export default {
    props:['busdata','siddata'],
    setup(props,{emit}) {
        const data = reactive({
            busdata:props.busdata
        })
        const selpurbyid=(value)=>{
            emit('event',value)
        }
        return {
            ...toRefs(data),selpurbyid
        }
    }
}
</script>
<style scoped></style>